Combined 3D Rendering Series: 3D Rendering in Windows, 3D Models in Motion, and 3D Articulation by Benton D. James
Author:Benton, D. James [Benton, D. James]
Language: eng
Format: epub, pdf
Publisher: UNKNOWN
Published: 2021-09-23T16:00:00+00:00
Figure 102. Olympic Rings Final Position
Lorenz Attractor
The next combined simple motion we will consider is that of the Lorenz attractor demo written by Aaron Ferrucci and included in the OpenGL⢠SDK (may also be found in the online archive). The following description accompanies this demo:
This program shows some particles stuck in a Lorenz attractor (the parameters used are r=28,b=8/3,sigma=10). The eye is attracted to the red particle, with a force directly proportionate to distance. A command line puts the whole mess inside a box made of hexagons. I think this helps to maintain the illusion of 3 dimensions, but it can slow things down. Other options allow you to play with the redraw rate and the number of new lines per redraw. So you can customize it to the speed of your machine.
The biggest difference between this example and the previous ones is that the motion follows a specific pattern described by the physics controlling the motion of the particles. The position of the particles is calculated at each time step in the following function:
void move_eye(void)
{
/* first move the eye */
eyev[0]+=gravity*(rv[rp][0]-eyex[0]);
eyev[1]+=gravity*(rv[rp][1]-eyex[1]);
eyev[2]+=gravity*(rv[rp][2]-eyex[2]);
/* adjust position using new velocity */
eyex[0]+=eyev[0]*dt;
eyex[1]+=eyev[1]*dt;
eyex[2]+=eyev[2]*dt;
/* move the lookat point */
/* it catches up to the red point if it's moving slowly enough */
eyel[0]+=LG*(rv[rp][0]-eyel[0]);
eyel[1]+=LG*(rv[rp][1]-eyel[1]);
eyel[2]+=LG*(rv[rp][2]-eyel[2]);
/* change view */
gluLookAt(eyex[0],eyex[1],eyex[2],eyel[0],
eyel[1],eyel[2],0,1,0);
}
Download
Combined 3D Rendering Series: 3D Rendering in Windows, 3D Models in Motion, and 3D Articulation by Benton D. James.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Windows Terminal Tips, Tricks, and Productivity Hacks by Will Fuqua(1401)
Augmented Reality with Unity AR Foundation by Jonathan Linowes(1179)
Sketching User Experiences by Buxton Bill(590)
Object-Role Modeling Fundamentals: A Practical Guide to Data Modeling with ORM by Terry Halpin(563)
Beginning AutoCAD 2020 Exercise Workbook by Cheryl R. Shrock(539)
You Donât Know JS: Up & Going by Kyle Simpson(519)
Adobe InDesign for Absolute Beginner: Tips and Techniques to Creating Professional Books and Magazines for Online and Desktop Publishing using InDesign by Scott Walter & Scott Walter(460)
SketchUp For Dummies by Bill Fane & Mark Harrison & Josh Reilly(453)
AI 2041: Ten Visions for Our Future by Kai-Fu Lee & Chen Qiufan(453)
Windows 10: The Missing Manual by Pogue David(445)
100 Principles of Game Design by unknow(441)
Advanced Game Design by Michael Sellers(429)
The Rainbow Stack: A Casual Guide to UX Design by Jawara Joseph(411)
Research Methods in Human-Computer Interaction by unknow(411)
Mastering InDesign Templates by Murphy Monica & Knorr Mancini Margot(409)
Hands-On Data Visualization by Jack Dougherty(407)
Photoshop Elements 12 All-in-One For Dummies by Barbara Obermeier & Ted Padova(402)
Connected, Intelligent, Automated: The Definitive Guide to Digital Transformation and Quality 4.0 by Radziwill N. M(384)
TensorFlow 2.0 Computer Vision Cookbook by Jesus Martinez(383)